<?php

/*
 * Created on 2011-4-13
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require ('Common.inc.php');

require (SERVER_ROOT_PATH . '/lib/Framework.class.php');

new Framework();

if($_SESSION['username']){
	header("Location:/user/showlist.php");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>读读</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

         <meta name="viewport" content="width=770"/>
        <link rel="icon" href="/favicon.png"/>
                
        <script type="text/javascript" src="/js/combined.js"></script>
                <script type="text/javascript" src="/js/sharing.js"></script>

                <link rel="stylesheet" href="/css/main.css"/>
    </head>
    <body onload="document.getElementById('username').focus()">
        <div id="header">
            <div id="userpanel">
                
                                 
                    &nbsp;<span style="color: #ccc;">&bull;</span>&nbsp;
                    <a href="/user/register.php">创建帐号</a>

                
            </div>

            <h1 id="logo">
                <a href="/" class="logo">读读</a>
            </h1>

            <div style="font-size: 14px; margin-top: 8px;">简单app.</div>
        </div>

        <div id="content">
             
<?php
	if($_SESSION['errorlogin']){  
?>
<div class="errors">
        <div class="error">
            <p>Sorry, that's not valid.</p>
                            <p>
                    Would you like to 
                    <a href="/user/register.php">create an account for <b><?php echo $_SESSION['errorlogin']; ?></b></a>?
                </p>
                    </div>
    </div>
<?php }?>

<?php
	if($_SESSION['errorpwd']){  
?>
<div class="errors">
        <div class="error">
            <p>Sorry, that's not valid.</p>
                            <p id="fp1">
                    Did you <a onclick="var e = document.getElementById('fpform'); e.style.display = (e.style.display == 'block' ? 'none' : 'block'); this.blur(); return false;" href="#">forget your password?</a>
                </p>
                    </div>
    </div>
<?php }?>

<form action="/user/loginaction.php" method="post" 
 style="width: 300px; margin: 0px auto 0px auto; text-align: center;"
>
    
    <div style="margin-bottom: 20px;">
        <label for="username" style="display: block;">Email address:</label>
        <input type="text" name="username" id="username" value=""/>
        <div style="font-size: 11px; color: #777;">(or username, if not an email)</div>
    </div>
    <div style="margin-bottom: 20px;">

        <label for="password" style="display: block;">Password:</label>
        <input type="password" name="password" id="password"/>
        <div style="font-size: 11px; color: #777;">(if you have one)</div>

        <div style="margin-top: 1em;"><input type="submit" value="Log in" id="log_in"/></div>
    </div>
</form>        </div>

        <div id="footer">

            <a href="/faq">FAQ</a> &bull;
            <a href="/main/support">Support</a> &bull;
            <a href="/iphone">iPhone App</a> &bull;
            <a href="http://blog.instapaper.com/">Blog</a> &bull;

            <a href="http://twitter.com/instapaper">Twitter</a> &bull;
            <a href="/publishers">Information for Publishers</a> &bull;
            <a href="/press-kit">Press Kit</a> &bull;
            <a href="/privacy-policy">Privacy Policy</a> &bull;
            <a href="/api/full">API</a>

            
            <div style="margin-top: 1em;">
            &copy;&nbsp;2008-2011 读读, LLC.
            Contact <a href="http://www.marco.org/">Marco Arment</a>, founder:
            <a href="mailto:instapaper@marco.org">instapaper@marco.org</a>.
            </div>
        </div>
        <script type="text/javascript">

          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-638312-6']);
          _gaq.push(['_trackPageview']);

          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
          })();

        </script>
    </body>

</html>
